Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve #957

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Resolve #957

wants to merge 4 commits into from

Conversation

ihorutkin
Copy link

No description provided.

app/main.py Outdated

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to commit anything to this file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete DB from your PR

self.connection.execute(
f"""
INSERT INTO {self.table_name} (first_name, last_name)
VALUES (?, ?)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use parametrization, as here you are sure which fileds you insert

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't change this
first_name = ?, last_name = ?

app/managers.py Outdated
)
self.connection.commit()

def all(self) -> list:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function will return list of what? Fix annotation

app/managers.py Outdated
Comment on lines 29 to 30
Actor(*actor)
for actor in all_actors

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do it on one line

app/managers.py Outdated
SET first_name = ?, last_name = ?
WHERE id = ?
""",
(id_, new_first_name, new_last_name),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the order of parameters

self.connection.execute(
f"""
INSERT INTO {self.table_name} (first_name, last_name)
VALUES (?, ?)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't change this
first_name = ?, last_name = ?

app/managers.py Outdated

class ActorManager:
def __init__(self) -> None:
self.connection = sqlite3.connect("../cinema.sqlite")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"cinema.sqlite" will be enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants